import Vue from 'vue'
import Router from 'vue-router'
import Home from '@/views/Home.vue'
import Login from '@/views/Login.vue'
import Users from '@/views/user/Users.vue'
Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/',
      redirect: {name: 'login'}
    },
    {path: '/home',
      name: 'home',
      component: Home,
      children: [
        {path: '/users',
          name: 'users',
          component: Users
        }
      ]
    },
    {path: '/login',
      name: 'login',
      component: Login
    }
  ]
})
